<template>
    <!--使用组件-->
    <!-- <Child v-bind:items="users" blog-title="Prop传参"></Child> -->
    Count is:{{ count }}
    <Child v-bind:items="users" blog-title="测试子组件检验父组件传递的数据" @tolarge="largeText"></Child>
</template>
<script>
//1.导入组件
import Child from './Child.vue';
export default{
    data(){
        return{
            count:0,
            users: [
                { id: 1, uname: 'admin', nickName: '管理员', gender: '女' },
                { id: 2, uname: 'zhangsan', nickName: '张三', gender: '男' },
                { id: 3, uname: 'lice', nickName: '李四', gender: '男' },
                { id: 4, uname: 'wangwu', nickName: '王五', gender: '女' },
                { id: 5, uname: 'zhaoliu', nickName: '赵六', gender: '女' }
            ],
        }
    },
    //2、注册组件
    components:{
        Child
    },
    methods:{
        largeText(a){
            console.log('largeText.....',this.count)
            this.count += a;
        }
    }
}
</script>